set preview
set sixel true
set previewer ~/.config/lf/previewer
set cleaner ~/.config/lf/cleaner
set dircounts
set tabstop 4
set mouse

cmd open &{{
    case $(file --mime-type -Lb -- "$(readlink -f -- "$f")") in\
        text/*|application/json|inode/x-empty|application/octet-stream)
            lf -remote "send $id \$$EDITOR \"$(echo $f)\""
            ;;
        image/*)
            lf -remote "send $id \$imv \"$(echo $f)\""
            ;;
        video/*)
            mpv "$f" &
            ;;
        audio/*)
            lf -remote "send $id \$mpv \"$(echo $f)\""
            ;;
    esac
}}

cmd cb_copy &{{
    wl-copy < "$(readlink -f "$f")"
}}

map a push %mkdir<space>
map D delete
map Y cb_copy
